import React, { PropTypes } from 'react';
import DataNone from '../DataNone'
import style from './index.less'

const List=({data})=> {
  if(data.length){
    return(<div className={style.root}>
      <ul>
        {
          data.map((item, i) => (
                <li key={i}><p>{item}</p></li>
              ))
        }
      </ul>
    </div>
    )
  }else{
    return <DataNone />
  }
}

List.propTypes = {
  data: PropTypes.array.isRequired,
};

export default List;
